package lesson01;

/**
 * lambda 表达式创建 Runnable 子类对象
 *
 * @author wileda
 * @date 2023/01/03  17:45
 */
public class Demo06 {
    public static void main(String[] args) {
        Thread thread = new Thread(()->{
            int count = 0;
            while (true) {
                System.out.println("lambda 表达式创建 Runnable 子类对象");
                try {
                    Thread.sleep(1000);
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
            }
        }) ;
        thread.start();
    }
}
